import { createRouter, createWebHistory , createWebHashHistory} from 'vue-router'

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: ()=>import('../Layout.vue'),
      alias: '/layout',
      children:[
        {
          path: 'user_list',
          name: 'user_list',
          component: ()=>import('../views/users/ListView.vue')
        },
        {
          path: 'banner_add',
          name: 'banner_add',
          component: () => import('../views/banner/AddView.vue')
        },
        {
          path: 'banner_list',
          name: 'banner_list',
          component: () => import('../views/banner/ListView.vue')
        },
        {
          path: 'navi_add',
          name: 'navi_add',
          component: () => import('../views/navi/AddView.vue')
        },
        {
          path: 'navi_list',
          name: 'navi_list',
          component: () => import('../views/navi/ListView.vue')
        },
        {
          path: 'papers',
          name: 'papers',
          component: () => import('../views/article/PaperView.vue')
        },
        {
          path: 'setting',
          name: 'setting',
          component: () => import('../views/SetView.vue')
        },
        {
          path: 'index',
          name: 'index',
          component: () => import('../views/IndexView.vue')
        },
      ]
    },
    {
      path: '/home',
      name: 'home',
      component: ()=>import('../views/HomeView.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: ()=>import('../views/LoginView.vue')
    },
    {
      path: '/admin',
      name: 'admin',
      component: ()=>import('../views/AdminView.vue')
    },
    {
      path: '/findpwd',
      name: 'findpwd',
      component: ()=>import('../views/FindPwd.vue')
    },
    
  ]
})

export default router
